﻿#ifndef LOGIN_H
#define LOGIN_H

#include <QDialog>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlQueryModel>
#include <QSqlError>
#include "forgetpassword.h"
namespace Ui {
class login;
}

class login : public QDialog
{
    Q_OBJECT

public:
    explicit login(QDialog *parent = nullptr);
    ~login();

    bool isFunctionCall();
protected:
    virtual void changeEvent(QEvent* event);
    void keyPressEvent(QKeyEvent *event);

private:
    void initLogin();

private slots:
    //忘记密码按钮槽函数
    void on_forgetPassword_pushButton_clicked();
    //确认按钮槽函数
    void on_confirm_pushButton_clicked();

    void on_close_Btn_clicked();

    void on_userName_lineEdit_textChanged(const QString &arg1);

    void on_userPassword_lineEdit_textChanged(const QString &arg1);

signals:
    void signalResult(int);
private:
    Ui::login *ui;
    ForgetPassword m_forgetpassword;
    bool isFlag;
};

#endif // LOGIN_H
